﻿@model IPagedList<Order>

@using EShop.Core;
@using EShop.Core.Model.Store;
@using EShop.Store.Extensions;
@using EShop.Store.Models.Common;

@{
    Layout = "~/Areas/Admin/Views/Shared/_ContentTemple.cshtml";
}

<table>
<tbody>
<tr>
<th>订单流水</th>
<th>下单时间</th>
<th>价格</th>
<th>购买人</th>
<th>媒体账户</th>
<th>状态</th>
<th>操作</th>
</tr>
<tr>
<td class="clear" colspan="7"></td>
</tr>
</tbody>
          <tbody>
              @foreach(var m in Model)
              {
            <tr>
              <td>@m.OrderNum</td>
              <td>@m.OrderTime</td>
              <td>@m.totalPrice</td>
              <td>@m.UserName</td>
              <td>@m.ShopsName</td>
              <td>@Html.Label(EShop.Core.Model.Common.EnumExtensions.ToName((EShop.Core.Model.Common.EShopEnum.OrderStateEnum)m.State))</td>
              <td>@if (m.State == (int)EShop.Core.Model.Common.EShopEnum.OrderStateEnum.Verify) 
                  {
                      @Html.ActionLink("核实信息", "Order_Audit", new { id=m.Id})
                  }</td>
            </tr>
              }
          </tbody>
   <tr>
       <td colspan="7">
           @{
    var pager = @Html.Pager(new PagerModel()
    {
        PageSize = Model.PageSize,
        TotalRecords = Model.TotalCount,
        PageIndex = Model.PageIndex,
        ShowTotalSummary = false,
        RouteActionName = "Admin_default",
        UseRouteLinks = true,
        RouteValues = new RouteValues { page = 0 }
    });
}
@pager
       </td>

   </tr>
        </table>   
